//---------------------------------------------------------------------------

#ifndef HistoryH
#define HistoryH
//---------------------------------------------------------------------------

//header file-file library
#include <iostream>
#include <fstream>
#include <shlobj.h>
#include <stdio.h>
#include <string>
#include <windows.h>
#include <stdlib.h>
#include <dirent.h>
#include "Player.h"
#include "Coin.h"


using namespace std;

class History{
	private :
		string namaf; //menyimpan nama file
		string folder; //menyimpan path file
		Player mPlayer[10];
	public :
	/* Konstruktor */
		History(); //constructor
		History(const string&); //copy constructor

	/* Destruktor */
		~History();

	/* Other Method */

		string GetName(); //mengembalikan nama file
		Player GetPlayer(int i);
		
		void initPlayer(string);
		
		void SetName(string); //men-set nama file

		void LoadHighScore(bool*, string); //method utama me-load data permainan, sudah ada nama file

		void SaveHighScore(string); //method utama men-save data permainan, sudah ada nama file

		string GetFolder(); //mengembalikan path file

		void SetFolder(int*); //menset path file

		void SaveLastGame(string, Coin myCoin[24], int, int, bool, int);

		void LoadLastGame(bool* , string, Coin*myCoin, int* , int* , bool*);
		
		//string BrowseFile(bool); //ini belum tersedia

		// void SearchFile(string, bool&); //menghasilkan nilai true jika file tersebut sudah ada
		
		void initHighScore(int j); // inisialisasi high score awal
		void updateHighScore(); // meng-update data highscore
		void printcmd();
};

#endif
